#ifndef _WMI_FILEDIRECTORY_H
#define _WMI_FILEDIRECTORY_H

/******************************************************************************
** @file	wmi_filedirectory.h
** @author	Joel Chuca 
** @author	Marcel Morales
** @date	Jul 25, 2010
**
** @desc	This class represent a process win32_directory and CIM_DataFile.
*			
**
******************************************************************************/

#include <string>
#include <Wbemidl.h>
#include <comdef.h>
#include <exception>
#include "wmi_utils.h"
#include "wmi_iwinobject.h"
#include "wmi_connection.h"
#include "wmi_connectionmanager.h"
#include "wmi_constants.h"
#include <log4cxx\logger.h>
#include <log4cxx\xml\domconfigurator.h>
#include "wmi_common.h"
#include <iostream>
class SOEXPORT WMI_FileDirectory: public WMI_IWinObject
{
public:
    /**
    *
    */
    WMI_FileDirectory();

    /**
    * FileDirectory Constructor initilize all properties.
    *
    * @param IWbemClassObject* pointer to a IWbemClassObject instance.
    */
    WMI_FileDirectory(IWbemClassObject*);

    ~WMI_FileDirectory();

    /**
    * Loads the properties to this object
    */
    void 
	setProperties();

    /**
    * Gets the 'caption' property
    */
    const wstring& 
	getCaption()
    {
        return _caption;
    }

    /*
    * Sets the 'caption' property
    */
    void 
	setCaption(const wstring& caption)
    {
        _caption = caption;
    }

    /**
    * Gets the 'description' property
    */
    const wstring& 
	getDescription()
    {
        return _description;
    }


    /*
    * Sets the 'description' property
    */
    void 
	setDescription(const wstring& des)
    {
        _description = des;
    }

    /**
    * Gets the 'name' property
    */
    const wstring& 
	getName()
    {
        return _name;
    }

    /*
    * Sets the 'name' property
    */
    void 
	setName(const wstring& name)
    {
        _name = name;
    }

    /**
    * Gets the 'status' property
    */
    const wstring& 
	getStatus()
    {
        return _status;
    }


    /*
    * Sets the 'status' property
    */
    void 
	setStatus(const wstring& status)
    {
        _status = status;
    }

    /**
    * Gets the 'installDate' property
    */
    const CTime& 
	getInstallDate()
    {
        return _installDate;
    }

    /*
    * Sets the 'installDate' property
    */
    void 
	setInstallDate(const CTime& time)
    {
        _installDate = time;
    }

    /**
    * Gets the 'creationDate' property
    */
    const CTime& 
	getCreationDate()
    {
        return _creationDate;
    }

    /*
    * Sets the 'creationDate' property
    */
    void 
	setCreationDate(const CTime& time)
    {
        _creationDate = time;
    }

    /**
    * Gets the 'lastAccessed' property
    */
    const CTime& 
	getLastAccessed()
    {
        return _lastAccessed;
    }

    /*
    * Sets the 'lastAccessed' property
    */
    void 
	setLastAccessed(const CTime& time)
    {
        _lastAccessed = time;
    }

    /**
    * Gets the 'lastModified' property
    */
    const CTime& 
	getLastModified()
    {
        return _lastModified;
    }


    /*
    * Sets the 'description' property
    */
    void 
	setLastModified(const CTime& time)
    {
        _lastModified = time;
    }

    /**
    * Gets the 'description' property
    */
    const bool 
	isWriteable()
    {
        return _writeable;
    }

    /*
    * Sets the 'description' property
    */
    void 
	setWriteable(bool wri)
    {
        _writeable = wri;
    }

    /*
    * Overrides of method. Prints in console some propeties
    */
    virtual void print();

protected:
    /**
    * Holds short description (one-line string) of the object.
    */
    wstring _caption;

    /**
    * Holds Description of the object
    */
    wstring _description;

    /**
    * Holds the date the object was installed. This property does not require
    * a value to indicate that the object is installed. 
    */
    CTime _installDate;

    /**
    * Holds the name that serves as a key of a logical file instance within a 
    * file system. Full path names should be provided
    */
    wstring _name;

    /**
    * Holds the current status of the object. The values are: "Error", 
    * "Starting", "Stopping", and "Service". The latter, "Service"
    */
    wstring _status;

    /**
    * Holds the date of the file was created.
    */
    CTime _creationDate;

    /**
    * Holds the date of the file was last accessed.
    */
    CTime _lastAccessed;

    /**
    * Holds the date of the file was modified.
    */
    CTime _lastModified;

    /**
    * Holds a boolean data. If True, the file can be written.
    */
    bool _writeable;

    /**
    * Holds a pointer to a IWbemClassObject instance.
    */
    IWbemClassObject* _pclsObj;

};

#endif